<template>
  <div id="app">
    <div class="item news" @click="onClickNews">头条新闻</div>
    <div class="item weather" @click="onClickWeather">今日天气</div>
  </div>
</template>

<script>
import JSBridge from '../../common/jsbridge'

export default {
  name: 'App',
  components: {
  },
  methods: {
    onClickNews() {
      JSBridge.Navigation.push({
        id: 'news',
        page: 'index.html'
      })
    },
    onClickWeather() {
      JSBridge.Navigation.push({
        id: 'weather',
        page: 'index.html'
      })
    },
  }
}
</script>

<style>
body {
  margin: 0;
  padding: 0;
}

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

.item {
  font-size: 20px;
  font-weight: bold;
  border-top: 1px solid #ddd;
  padding: 20px;
}
.item:last-child {
  border-bottom: 1px solid #ddd;
}
</style>
